package com.sise.parkinglot.controller.applet;

import com.sise.parkinglot.bean.CodeMsg;
import com.sise.parkinglot.entity.User;
import com.sise.parkinglot.service.IParkService;
import com.sise.parkinglot.service.IUserService;
import com.sise.parkinglot.service.impl.ParkServiceImpl;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.Map;

/**
 * @author ZJ
 */
@RestController
@RequestMapping("/api/pay")
public class AppletPayController {

    @Resource
    private IParkService parkService;

    @PostMapping("/pay")
    public CodeMsg<String> pay(@RequestBody Map<String, Object> map) {
        return parkService.pay(map);
    }

    @RequestMapping("/notifyPay")
    public String notifyPay(String order_no, int pay_type, float realmoney, String result, String xddpay_order,String sign) {
        return parkService.notifyPay(order_no, pay_type, realmoney, result, xddpay_order, sign);
    }

}
